<?php
$title = '贷款';
$this->headTitle($title);
?>
<h1><?php echo $this->escapeHtml($title); ?></h1>
<hr>
<table class="table table-hover table-striped">
    <tr>
        <th>贷款号</th>
        <th>银行</th>
        <th>账户号</th>
        <th>贷款额</th>
        <th>收支</th>
    </tr>
    <?php foreach ($this->loan as $key => $loan) { ?>
        <tr>
            <td><?php echo $loan['loan_id']; ?></td>
            <td><?php echo $loan['bank_name']; ?></td>
            <td><?php echo $loan['account_id']; ?></td>
            <td><?php echo $loan['account']; ?></td>
            <td>
                <a href="<?php echo $this->url("loan/default", array("controller" => "balance", "action" => "index", "id" => $loan["loan_id"])); ?>">查看</a>
            </td>
        </tr>
    <?php } ?>
    <tr>
        <th>合计</th>
        <td></td>
        <td></td>
        <td><?php echo empty($this->loan_balance) ? 0 : $this->loan_balance; ?></td>
        <td></td>
    </tr>
</table>